﻿<UserControl x:Class="Chapters.Chapter16.CrossThreadDataBindingExample"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Grid>
		<StackPanel>
			<TextBlock Text="{Binding Value, ElementName=Progress, StringFormat={}{0:F2}% Completed}" />
			<ProgressBar x:Name="Progress"
						 Minimum="0"
						 Maximum="100"
						 Value="{Binding Path=.}"
						 Height="30"
						 Margin="0,10,0,10" />


			<StackPanel Orientation="Horizontal">
				<Button x:Name="StartButton"
						Margin="0,0,10,0"
						Click="StartWork">Start</Button>
				<Button x:Name="CancelButton"
						Click="CancelWork">Stop</Button>
			</StackPanel>
		</StackPanel>
	</Grid>
</UserControl>
